package com.example.zhugenew;

import android.app.Application;

import com.example.myhttplibrary.global.GlobalConfig;
import com.example.myhttplibrary.utils.LogUtils;

import okhttp3.logging.HttpLoggingInterceptor;

public class MyApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        HttpLoggingInterceptor httpLoggingInterceptor=new HttpLoggingInterceptor(new HttpLoggingInterceptor.Logger() {
            @Override
            public void log(String message) {
                LogUtils.e(message);
            }
        });
        httpLoggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
        GlobalConfig.getInstance()
                .addInterceptors(httpLoggingInterceptor);

    }
}
